using System;

namespace ConcursoCV.UI
{
	/// <summary>
	/// Summary description for MasterPage.
	/// </summary>
	public class MasterPage : Shams.Web.UI.MasterPages.MasterPageBase
	{
		public MasterPage()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		override public void AddPlaceHolderControls()
		{
			// clear place-holders contents from MasterPageBase(.)
			ClearPlaceHolderControls();
			
			// Now call the MasterPageBase:AddPlaceHolderControls(.)
			base.AddPlaceHolderControls();
		}

		override public void AddPlaceHolderHeader()
		{
			System.Web.UI.UserControl userControl = LoadUserControl("WebUserControls/MasterHeaderControl.ascx");
			base.userPageControl.PlaceHolderHeader.Controls.Add(userControl);
		}

		override public void AddPlaceHolderNavigation()
		{			
			//System.Web.UI.UserControl userControl = LoadUserControl("WebUserControls/NavigationControl.ascx");
			//base.userPageControl.PlaceHolderNavigation.Controls.Add(userControl);
		}

		override public void AddPlaceHolderLogo()
		{			
			//System.Web.UI.UserControl userControl = LoadUserControl("WebUserControls/MasterLogoControl.ascx");
			//base.userPageControl.PlaceHolderLogo.Controls.Add(userControl);
		}
		override public void AddPlaceHolderContents()
		{
			string id = this.Request["pid"];
			string userControlName = Helper.MenuHelper.GetUserControlName(id);
			//System.Web.UI.UserControl userControl = LoadUserControl("WebUserControls/Players/PlayerManageControl.ascx");
			System.Web.UI.UserControl userControl = LoadUserControl(userControlName);
			base.userPageControl.PlaceHolderContents.Controls.Add(userControl);
		}
		public override void AddPlaceHolderMenu()
		{
			System.Web.UI.UserControl userControl = LoadUserControl("WebUserControls/MasterMenuControl.ascx");
			base.userPageControl.PlaceHolderContents.Controls.Add(userControl);
		}

	}
}
